<%@ page contentType="text/html;charset=UTF-8" import="java.sql.*" language="java" %>
<%  
    String id = request.getParameter("id");   
    String JDBC_DRIVER = "com.mysql.jdbc.Driver";
    String DB_URL = "jdbc:mysql://localhost:3306/sims";
    String USER = "root";
    String PASS = "123456";    
        Class.forName(JDBC_DRIVER);       
        Connection conn = DriverManager.getConnection(DB_URL, USER, PASS);   
        String sql = "DELETE FROM student WHERE id=?";   
        PreparedStatement psmt = conn.prepareStatement(sql);
        psmt.setInt(1, Integer.parseInt(id));
        psmt.executeUpdate();
        conn.close();
        response.sendRedirect("index.jsp");
%>
